package com.unitd.frame.comm.tree;

import com.unitd.frame.comm.bean.BaseBean;

import java.util.List;

/**
 * @desc 此类用于定义JS zTree对应的数据结构的顶级对象,需要实现JS zTree的实体类需要集成此类
 * @filename Ztree.java
 * @version 1.0
 * @copyright www.unitd.com
 * @author Hudan
 * @date 2017/5/19
 */
@SuppressWarnings("serial")
public class Ztree<T> extends BaseBean {

	/** 节点ID */
	private String id;
	/** 节点代码 */
	private String code;
	/** 节点名称 */
	private String name;
	/** 父亲节点Id */
	private String pId;
	/** 父级节点名称 */
	private String pName;
	/** 图标 */
	private String icon;
	/** 是否展开 */
	private boolean open;
	/** 是否是父节点 */
	private boolean isParent;
	/** 节点下的子节点 */
	private List<T> children = null;

	public List<T> getChildren() {
		return children;
	}

	public void setChildren(List<T> children) {
		this.children = children;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getpId() {
		return pId;
	}

	public void setpId(String pId) {
		this.pId = pId;
	}

	public String getpName() {
		return pName;
	}

	public void setpName(String pName) {
		this.pName = pName;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public boolean isOpen() {
		return open;
	}

	public void setOpen(boolean open) {
		this.open = open;
	}

	public boolean isParent() {
		return isParent;
	}

	public void setParent(boolean parent) {
		isParent = parent;
	}
}